package com.ada.pojo;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

public class TypeRegisters {
    private final Map<String, Class<?>> TYPE_CLASS = new HashMap<String, Class<?>>();

    public TypeRegisters() {
        TYPE_CLASS.put("integer", Integer.class);
    }

    public String parseClass(String classString){
        if(classString == null){
            return classString;
        }
        String key = classString.toLowerCase(Locale.ENGLISH);
        if(TYPE_CLASS.containsKey(key)){
            return TYPE_CLASS.get(key).getName();
        }else {
            return classString;
        }
    }
}
